<div id="issue_header">
	<h2>Issues for <%= link_to @project.name, project_url(@project) %></h2>
</div>

<div class="floater">
  <h2>Actions</h2>
  <ul>
    <li><%= link_to 'Submit an Issue', url_for( :controller => :issues, :action => :new, :project_id => @project.name ) %>
    <li><%= link_to 'Browse Forum', '#' %></li>
  </ul>
</div>

<div class="cloud">
</div>

<table class="issue_table">
  <thead>
    <tr>
      <th>#</th>
      <th>Summary</th>
      <th>Status</th>
      <th>Priority</th>
      <th>Tags</th>
      <th>Last Updated</th>
    </tr>
  </thead>

  <tbody id="issue_table_body">
    <% @issues.each do |i| -%>
    <tr class="<%= cycle( 'even', 'odd' ) %>">
      <td class="local_id"><%= i.local_id %></td>
      <td><%= link_to i.summary, issue_url( @project.name, i.local_id ) %></td>
      <td><%= i.status %></td>
      <td><%= i.priority %></td>
      <td><%= i.cached_tag_list %></td>
      <% c = i.comments.last -%>
      <td><%= time_ago_in_words( c ? c.created_at : i.created_at ) %> ago</td>
    </tr>
    <% end -%>
  </tbody>
</table>


<div id="view_links">View: 
	<%= link_to "(open)", :action => :index %> | 
	<%= link_to "(closed)", :action => :closed %> | 
	<%= link_to "(all)", :action => :all %>
</div>

<%= button_to 'Create new issue', new_issue_path, :method => "get" %>
